
//初始化
var EDCinitback;
function init_EDC(callback) {
    EDCinitback = callback;
    window.external.EDC_INIT("init_EDC_callback");
}

function init_EDC_callback(receivedData) {
    EDCinitback(receivedData);
}

//发送收款指令
var EDCsalecallback;
////////////////// 金额  支付类型（0 信用卡，1 其他）   回调函数
function sale_EDC(money, type, callback) {
    EDCsalecallback = callback;
    window.external.EDC_Sale(money, type, "sale_EDC_callback");
}
function sale_EDC_callback(receivedData) {
    EDCsalecallback(receivedData);
}

//获取终端机的信息
var EDCgetinfocallback;
function getinfo_EDC(callback) {
    EDCgetinfocallback = callback;
    window.external.Get_EDC_Info("getinfo_EDC_callback");
}

function getinfo_EDC_callback(receivedData) {
    EDCgetinfocallback(receivedData);
}

//取消当前工作
function Canel_EDC() {
    window.external.EDC_Canel();
}
